package com.cloud.domain.file;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.cloud.type.file.FileStatus;
import com.cloud.type.file.FileType;
import com.cloud.type.file.SizeType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author liuyuan
 * @since 2019-09-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("f_folder")
public class Folder extends Model<Folder> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    public Long id;

    /**
     * 文件夹名
     */
    public String name;

    /**
     * 加密后的文件夹名
     */
    public String nameMd5;

    /**
     * 文件名
     */
    public String fileName;

    /**
     * 加密后的文件名
     */
    public String fileNameMd5;

    /**
     * 文件类型
     */
    public FileType type;

    /**
     * 父级
     */
    public Long parentId;

    /**
     * 路径
     */
    public String path;

    /**
     * 播放路径
     * */

    public String openPath;

    /**
     * 加密后的路径
     */
    public String pathMd5;

    /**
     * 用户id
     */
    public Long userId;

    /**
     * 状态
     */
    public FileStatus status;

    /**
     * 用户名
     */
    public String userName;

    /**
     * 加密后的用户名
     */
    public String userNameMd5;

    /**
     * 大小
     */
    public Double size;
    /**
     * 内存大小单位
     * */

    public SizeType sizeType;

    /**
     * 用于加密
     */
    public String salt;

    public LocalDateTime createDate;

    public LocalDateTime updateDate;

    /**
     * 正序排序
     */
    public String ascSort;


    public String getOpenPath() {
        return openPath;
    }

    public void setOpenPath(String openPath) {
        this.openPath = openPath;
    }

    public SizeType getSizeType() {
        return sizeType;
    }

    public void setSizeType(SizeType sizeType) {
        this.sizeType = sizeType;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNameMd5() {
        return nameMd5;
    }

    public void setNameMd5(String nameMd5) {
        this.nameMd5 = nameMd5;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileNameMd5() {
        return fileNameMd5;
    }

    public void setFileNameMd5(String fileNameMd5) {
        this.fileNameMd5 = fileNameMd5;
    }

    public FileType getType() {
        return type;
    }

    public void setType(FileType type) {
        this.type = type;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getPathMd5() {
        return pathMd5;
    }

    public void setPathMd5(String pathMd5) {
        this.pathMd5 = pathMd5;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public FileStatus getStatus() {
        return status;
    }

    public void setStatus(FileStatus status) {
        this.status = status;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserNameMd5() {
        return userNameMd5;
    }

    public void setUserNameMd5(String userNameMd5) {
        this.userNameMd5 = userNameMd5;
    }

    public Double getSize() {
        return size;
    }

    public void setSize(Double size) {
        this.size = size;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public LocalDateTime getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDateTime createDate) {
        this.createDate = createDate;
    }

    public LocalDateTime getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(LocalDateTime updateDate) {
        this.updateDate = updateDate;
    }

    public String getAscSort() {
        return ascSort;
    }

    public void setAscSort(String ascSort) {
        this.ascSort = ascSort;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
